import { register } from "@antv/x6-vue-shape";
import { Graph } from "@antv/x6";

import Gateway from "./Gateway.vue";
import Text from "./Text.vue";
import Service from "./Service.vue";
import Database from "./Database.vue";
import MQ from "./MQ.vue";
import Stream from "./Stream.vue";
import Cache from "./Cache.vue";

export function setupComponents() {
  register({
    shape: "gateway",
    width: 64,
    height: 84,
    component: Gateway
  });
  register({
    shape: "text",
    width: 100,
    height: 64,
    component: Text
  });
  register({
    shape: "service",
    width: 160,
    height: 60,
    component: Service
  });
  register({
    shape: "database",
    width: 160,
    height: 60,
    component: Database
  });
  register({
    shape: "mq",
    width: 160,
    height: 60,
    component: MQ
  });
  register({
    shape: "stream",
    width: 160,
    height: 60,
    component: Stream
  });
  register({
    shape: "cache",
    width: 160,
    height: 60,
    component: Cache
  });
  // Graph.registerNode(
  //   "service",
  //   service,
  //   true,
  // )
}
